package com.xysl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xysl.api.domain.Advertisement;
import com.xysl.api.domain.XyslMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface XyslHomeMapper {

    @Select("select *\n" +
            "from zl_menu a\n" +
            "         left join zl_role_menu zrm on a.id = zrm.menu_id\n" +
            "         left join zl_user_roles zur on zrm.role_id = zur.role_id\n" +
            "where a.parent_id=0 and a.status = 0 and  zur.user_id =#{userId}")
    public List<XyslMenu> queryLoginUserMenuList(Long userId);

}
